﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharedGenomics.Domain
{
    /// <summary>
    /// Corresponds to a single PModel job output result
    /// </summary>
    public class ModelAnalysisResult : AnalysisResult
    {
        [AnalysisResultColumn("TEST")]
        [ColumnDisplay("Test", Position = 1)]
        public string Test { get; private set; }

        [AnalysisResultColumn("AFF")]
        [ColumnDisplay("Affected", Position = 2)]
        public string Affected { get; private set; }

        [AnalysisResultColumn("UNAFF")]
        [ColumnDisplay("Unaffected", Position = 3)]
        public string Unaffected { get; private set; }

        [AnalysisResultColumn("L95", DefaultOnParseFailed = null)]
        [ColumnDisplay("L95", Position = 4)]
        public double? LowerConfidenceInterval { get; set; }

        [AnalysisResultColumn("U95", DefaultOnParseFailed = null)]
        [ColumnDisplay("U95", Position = 5)]
        public double? UpperConfidenceInterval { get; set; }

        [AnalysisResultColumn("OR", DefaultOnParseFailed = null)]
        [ColumnDisplay("O/R", Position = 6)]
        public double? OddsRatio { get; set; }

        [AnalysisResultColumn("CHISQ", DefaultOnParseFailed = double.NaN)]
        [ColumnDisplay("Chi Squared", Position = 7, Format = "F2")]
        public double ChiSquared { get; private set; }

        [AnalysisResultColumn("DF", DefaultOnParseFailed = null)]
        [ColumnDisplay("DOF", Position = 8)]
        public int? DegreesOfFreedom { get; private set; }

        [AnalysisResultColumn("BONF", DefaultOnParseFailed = double.NaN)]
        [ColumnDisplay("Bonferroni", Position = 9)]
        public double Bonf { get; set; }

        [AnalysisResultColumn("FDR_BH", DefaultOnParseFailed = double.NaN)]
        [ColumnDisplay("False Disc. Rate", Position = 10)]
        public double BonfFalseDiscoveryRate { get; set; }
    }
}
